﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using S4Store.Domain;
using S4Store.Domain.Report;

namespace S4Store.Models.Report
{
    public class CarModelTimeRateModel : BaseReportModel
    {
        public class ModelData
        {
            public CarModel CarModel { get; set; }
            public int Sale { get; set; }
            public int SaleTarget { get; set; }
            public int SaleExpectTarget
            {
                get
                {
                    return (int)(SaleTarget * Rate);
                }
            }
            public decimal Rate { get; set; }
        }

        public int BrandId { get; set; }
        public int DayCount { get; set; }
        public int Day { get; set; }
        public decimal DateRate
        {
            get
            {
                return (decimal)Day * (decimal)100 / (decimal)DayCount;
            }
        }

        public List<ModelData> ModelDatas = new List<ModelData>();

        public List<CarModelSaleReport> Reports = new List<CarModelSaleReport>();
    }
}